package com.atguigu.gulimall.member.service;

import com.atguigu.gulimall.member.exception.PhoneExistException;
import com.atguigu.gulimall.member.exception.UsernameExistException;
import com.atguigu.gulimall.member.vo.MemberLoginVo;
import com.atguigu.gulimall.member.vo.MemberRegistVo;
import com.atguigu.gulimall.member.vo.SocialUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.member.entity.MemberEntity;

import java.util.Map;


public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistVo vo);

    void checkPhoneUnique(String phone) throws PhoneExistException;// 检查手机是否唯一

    void checkUsernameUnique(String username) throws UsernameExistException;// 检查用户名是否唯一
    /**
     * 使用手机号或用户名登录
     */
    MemberEntity login(MemberLoginVo vo);

    /**
     * 方法的重载之社交登录
     */
    MemberEntity login(SocialUser socialUser);
}

